<template>
    <view class="card" @click="toDetail">
        <image class="cover" :src="info.verticpic"></image>
        <text class="title ellipsis fs-28 bold">{{info.vname}}</text>
        <view class="fs-24 dark-text tag">历史最高收益</view>
        <text class="fs-24 money">
            {{info.totalMaxIncome?info.totalMaxIncome+'元':'0'}}
        </text>
    </view>
</template>
<script>
import { getLocalUserInfo } from "../../assets/utils/index";
export default{
    props:{
        info:Object  
    },
    data(){
     return{}   
    } ,
    methods: {
        toDetail(){
            console.log('----')
            let userId = getLocalUserInfo().userId;
            if(!userId){
                return uni.navigateTo({
                url:'/pages/login/index'  
                })
            }
            uni.navigateTo({
                url: `/pages/extend/detail/index?id=${this.info.vid}`
            })   
        }
    },
}
</script>
<style lang="less" scoped>
@import url('../../assets/styles/common.less');

.card{
    box-sizing: border-box;
    width:100%;
    .cover{
        height: 290rpx;
        width: 100%;
        margin: 0;
        padding: 0;
        border-radius: 12rpx;
        display: block;
        background: #f6f6f6;
    }
    .title{
        width:100%;
        display: block;
        margin-top: 16rpx;
    }
    .tag{
        margin:16rpx 0 8rpx 0
    }
    .money{
        max-width: 80%;
        background: rgba(246,89,0,0.1);
        color:#F65900;
        height: 36rpx;
        line-height: 36rpx;
        border-radius: 8rpx;
        text-align: center;
        padding: 0 16rpx;
        box-sizing: border-box;
    }
}
</style>